# Maintainer: Johannes Löthberg <johannes@kyriasis.com)
# Maintainer: Robin Candau <antiz@archlinux.org>
# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: karnath <karnathtorjian@gmail.com>

pkgname=zathura-pdf-poppler
pkgver=0.3.1
pkgrel=2

pkgdesc="Adds pdf support to zathura by using the poppler engine"
url="https://pwmt.org/projects/zathura-pdf-poppler/"
arch=('loong64' 'x86_64')
license=('custom')

depends=('poppler-glib' 'zathura' 'desktop-file-utils')
makedepends=('meson' 'ninja')

source=(zathura-pdf-poppler-$pkgver.tar.gz::https://github.com/pwmt/zathura-pdf-poppler/archive/$pkgver.tar.gz)

sha256sums=('dc7621dd213adc9618e6c1395ce6b1afece5fa0091930ecc2e9599c625a97439')

build() {
  cd zathura-pdf-poppler-$pkgver
  arch-meson build
  ninja -C build
}

package(){
  DESTDIR="$pkgdir" ninja -C zathura-pdf-poppler-$pkgver/build install
  install -Dm0644 zathura-pdf-poppler-$pkgver/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
